<template>
<div class=''>
  <img :src="verificationCodeImg" @click="getVerificationCode"/>
</div>
</template>

<script>
import API from '@/api/auth'
export default {
  name: 'getVerificationCode',
  data () {
    return {
      verificationCodeImg: null
    }
  },
  methods: {
    getVerificationCode () {
      API.getVerificationCode().then(res => {
        this.verificationCodeImg = res
      }).catch(e => {
        this.$message.error(`error:${e.message}`)
      })
    }
  },
  mounted () {
    this.getVerificationCode()
  }
}
</script>
<style lang='less' scoped>

</style>
